var geoLayer;
/**
 * 绘制巡检轨迹
 * @param data
 */
function drawLine(data) {
    if(map.hasLayer(geoLayer)){
        map.removeLayer(geoLayer);
    }
    data=JSON.stringify(data);
    data = JSON.parse(data);
    var geoJson = {
        "type": "Feature",
        "geometry": data
    };
   geoLayer= L.geoJSON(geoJson, {
        style: function (feature) {
            return {color: "#FF0000"};
        }
    }).addTo(map);
}
